#############################
# User variables
#############################
TB       = harness
SEED     = 1
TESTNAME = tc_sanity 

#############################
# Environment variables
#############################
COMP                 = vcs -full64 -fsdb -ntb_opts uvm-1.1 -sverilog -debug_all -timescale=1ns/1ps -l comp.log -f ./tb.f -cm line+tgl+branch -cm_hier cm.cfg
RUN                  = ./$(TB).simv -l run.log -sml -cm line+tgl+branch -cm_name $(SEED)_$(TESTNAME) +ntb_random_seed=$(SEED) +UVM_TESTNAME=$(TESTNAME) +UVM_VERBOSITY=UVM_HIGH 

comp: 
	$(COMP) -top $(TB) -o $(TB).simv
	#$(ELAB) -top -o $(TB).simv

run:
	$(RUN) 

rung:
	$(RUN) -gui

editcov:
	urg -full64 -format both -dir $(TB).simv.vdb 
	dve -cov -dir $(TB).simv.vdb

# option for exlucde file given to generate coverage report 
# if there is such a coverage exclusion file
# urg -dir ... -elfile filename.el
viewcov:
	urg -full64 -format both -dir $(TB).simv.vdb 
	firefox urgReport/dashboard.html

clean:
	rm -rf AN.DB DVEfiles csrc *.simv *.simv.daidir ucli.key
	rm -rf *.log* *.vpd *.h urgReport
verdi:
	verdi -f tb.f -ssf tc.fsdb
